@extends('admin/layout/index')

@section('title')
	轮播列表
@endsection

@section('css')
	<link rel="stylesheet" href="/d/css/page_page.css">
@endsection

@section('content')
	<div class="mws-panel grid_8">
    	<div class="mws-panel-header">
        	<span><i class="icon-table"></i>轮播列表页</span>
        </div>
        <div class="mws-panel-body no-padding">
            <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
	            <form action="/admin/lunbo/index" method="get">
	            	<div id="DataTables_Table_1_length" class="dataTables_length">
			            <label>显示
			            <select size="1" name="count" aria-controls="DataTables_Table_1">
				            <option value="2" @if(!empty($request['count']) && $request['count'] == 2) selected @endif>2</option>
				            <option value="4" @if(!empty($request['count']) && $request['count'] == 4) selected @endif>4</option>
				            <option value="6" @if(!empty($request['count']) && $request['count'] == 6) selected @endif>6</option>
				            <option value="8" @if(!empty($request['count']) && $request['count'] == 8) selected @endif>8</option>
			            </select> 条
			            </label>
		            </div>
		            <div class="dataTables_filter" id="DataTables_Table_1_filter">
			            <label>搜索: 
			            	<input type="text" aria-controls="DataTables_Table_1" name="search" value="{{$request['search'] or ''}}">
			            </label>
		           		 <input type="submit" value="查询">
		            </div>
	            </form>
	            <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
	                <thead>
	                    <tr role="row">
	                    <th style="width: 169px;">ID</th>
	                    <th style="width: 229px;">名称</th>
	                    <th style="width: 213px;">图片</th>
	                    <th style="width: 213px;">路径</th>
	                    <th style="width: 144px;">状态</th>
	                    <th style="width: 107px;">操作</th>
	                    </tr>
	                </thead>
	                
		            <tbody role="alert" aria-live="polite" aria-relevant="all">
		            	@foreach($data as $k => $v)
		            		<tr class="odd">
		                        <td class=" sorting_1">{{$v['lb_id']}}</td>
		                        <td class=" ">{{$v['lb_name']}}</td>
		                        <td class=" "><img src="/public/lbimage/{{$v['lb_pic']}}" alt="" width="80px"></td>
		                        <td class=" ">{{$v['lb_url']}}</td>
		                        <td class=" ">@if($v['lb_status'] == 1) 已开启 @else 已关闭 @endif</td>
		                        <td class=" ">
									　　<a href="/admin/lunbo/delete/{{$v['lb_id']}}" style="font-size:20px;color:black;" title="删除"><i class="icon-trash"></i></a>　　
									<a href="/admin/lunbo/edit/{{$v['lb_id']}}" style="font-size:20px;color:black;" title="修改"><i class="icon-pencil-2"></i></a>
		                        </td>
		                    </tr>
		                @endforeach

		            </tbody>
	            </table>

	            <div class="dataTables_info" id="DataTables_Table_1_info">Showing 1 to 10 of 57 entries</div>
	            <!-- <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_1_paginate">
		            <a tabindex="0" class="first paginate_button paginate_button_disabled" id="DataTables_Table_1_first">First</a>
		            <a tabindex="0" class="previous paginate_button paginate_button_disabled" id="DataTables_Table_1_previous">Previous</a>
		            <span>
			            <a tabindex="0" class="paginate_active">1</a>
			            <a tabindex="0" class="paginate_button">2</a>
			            <a tabindex="0" class="paginate_button">3</a>
			            <a tabindex="0" class="paginate_button">4</a>
			            <a tabindex="0" class="paginate_button">5</a>
		            </span>
		            <a tabindex="0" class="next paginate_button" id="DataTables_Table_1_next">Next</a>
		            <a tabindex="0" class="last paginate_button" id="DataTables_Table_1_last">Last</a>
	            </div> -->
	            <div class="dataTables_paginate paging_full_numbers" id="page_page">
	            	{!! $data->appends($request)->render() !!}
	            </div>
            </div>
        </div>
    </div>
@endsection